import axios from "axios";
// get请求
const users =(UserName:string)=>{
    return axios.get(`/api/users?UserName=${UserName}`)
}
// post请求
const user = (req:{})=>{
    return axios.post(`/api/user`,req)
}
// post请求
const list = (BookName:string)=>{
    return axios.get(`/api/get?BookName=${BookName}`)
}
// post请求
const addBook = (req:{})=>{
    return axios.post(`/api/add`,req)
}
// get请求
const init =()=>{
    return axios.get(`/api/`)
}
export {
    users,user,list,addBook,init
}